package headfirst.combined.djview;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JButton;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.geom.Point2D;
import javax.swing.JProgressBar;

public class MenuTestDrive {

	private static JFrame frame;
		public static void main(String []args){
			
		  // Create and set up the window.
		  frame = new JFrame("TEST DRIVE CENTER");
		  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		 
		  TransparentPanel panel = new TransparentPanel();
		  panel.setBackgroundImage(new ImageIcon("fondo.jpg").getImage());
		  
		  Component contents = panel;
		  frame.getContentPane().add(contents, BorderLayout.CENTER);
		  panel.setLayout(null);
		  
		  JButton btnDjviewTestdrive = new JButton("DJView TestDrive");
		  btnDjviewTestdrive.addActionListener(new ActionListener() {
		  	public void actionPerformed(ActionEvent arg0) {
		  		 /*BeatModelInterface model = new BeatModel();
				 ControllerInterface controller = new BeatController(model);*/
		  		 new DJTestDrive().play();
		  	}
		  });
		  btnDjviewTestdrive.setBounds(140, 45, 212, 46);
		  panel.add(btnDjviewTestdrive);
		  
		  JButton btnHeartmodel = new JButton("HeartModel TestDrive Singleton");
		  btnHeartmodel.addActionListener(new ActionListener() {
		  	public void actionPerformed(ActionEvent arg0) {
		  		ControllerInterface model = new HeartControllerSingleton(HeartModelSingleton.getInstance());
		  	}
		  });
		  btnHeartmodel.setBounds(140, 159, 212, 46);
		  panel.add(btnHeartmodel);
		  
		  JButton btnHeartmodel_1 = new JButton("HeartModel TestDrive");
		  btnHeartmodel_1.addActionListener(new ActionListener() {
		  	public void actionPerformed(ActionEvent arg0) {
		  		HeartModel heartModel = new HeartModel();
		        ControllerInterface model = new HeartController(heartModel);
		  	}
		  });
		  btnHeartmodel_1.setBounds(140, 102, 212, 46);
		  panel.add(btnHeartmodel_1);
		  
		  JButton btnMusicTestdrive = new JButton("Music TestDrive");
		  btnMusicTestdrive.addActionListener(new ActionListener() {
		  	public void actionPerformed(ActionEvent arg0) {
		        BeatModelInterface model = new MusicModel();
				ControllerInterface controller = new MusicController(model);
		  	}
		  });
		  btnMusicTestdrive.setBounds(140, 216, 212, 46);
		  panel.add(btnMusicTestdrive);
		  
		  JButton button = new JButton("Music TestDrive Mix");
		  button.addActionListener(new ActionListener() {
		  	public void actionPerformed(ActionEvent arg0) {
		  		new MusicMixPadTestDrive();
		  	}
		  });
		  button.setBounds(140, 273, 212, 46);
		  panel.add(button);
		  
		  JButton btnAllTestdriveMix = new JButton("All TestDrive");
		  btnAllTestdriveMix.addActionListener(new ActionListener() {
		  	public void actionPerformed(ActionEvent arg0) {
		  		new AllTestDrive();
		  	}
		  });
		  btnAllTestdriveMix.setBounds(140, 331, 212, 46);
		  panel.add(btnAllTestdriveMix);
		  
		  JButton btnOneTestdriveMix = new JButton("One TestDrive");
		  btnOneTestdriveMix.addActionListener(new ActionListener() {
		  	public void actionPerformed(ActionEvent arg0) {
		  		new OneTestDrive();
		  	}
		  });
		  btnOneTestdriveMix.setBounds(140, 388, 212, 46);
		  panel.add(btnOneTestdriveMix);
		  
		  
		 
		  //Set window size
		  frame.setPreferredSize(new Dimension(700,525));
		 
		  // Display the window.
		  frame.pack();
		  //frame.setLocationByPlatform(true);
		  frame.setLocation(180,100);
		  frame.setVisible(true);
		  
		}
}
